

// Address
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

public class User
{
    public int UserId { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string UserName { get; set; }
    [Column(TypeName = "varchar(256)")]

    public string Wx_Id { get; set; }
    [Column(TypeName = "varchar(256)")]

    public string Car_Id { get; set; }

}

public class Admin
{

    public int AdminId { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Number { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Password { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Role { get; set; }


    public string Token { get; set; }
    public string name { get; set; }
     public int contact { get; set; }
    public string remarks { get; set; }
    public int QQ { get; set; }
    public int wechat { get; set; }
}

public class Parking
{
    public int ParkingId { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Name { get; set; }
    public float Lat { get; set; }
    public float Lng { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Address { get; set; }

}

public class Site
{
    public int SiteId { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Name { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string BlueTooth { get; set; }
    [Column(TypeName = "varchar(256)")]
    public string Status { get; set; }
    public int ParkingId { get; set; }

    public Parking Parking { get; set; }


}
public class Roler
{
    public int RolerId { get; set; }
    public String number { get; set; }
    public String name { get; set; }
    public String password { get; set; }
    public String role { get; set; }
    public String phone { get; set; }
}





public class Sysform
{
    public int SysformId { get; set; }
    public int SystemId { get; set; }
    public string Syname { get; set; }
    public string Version { get; set; }
    public DateTime Time { get; set; }
    public string Address { get; set; }
    public string develoId { get; set; }
}

public class Custform
{
    public int CustformId { get; set; }
    public int Custcode { get; set; }
    public string Custschool { get; set; }
    public string Custarea { get; set; }
    public int Custqq { get; set; }
    public int Custwechat { get; set; }
    public string Custname { get; set; }
    public string Custtype { get; set; }
    public string Custdepartment { get; set; }
    public int Custftel { get; set; }
    public int Custtel { get; set; }
    public int Custweichat { get; set; }
    public int Custqqpos { get; set; }
    public string Custremark { get; set; }
    public string Systemname { get; set; }
}
public class Technology
{

    public int TechnologyId { get; set; }
    [Column(TypeName = "varchar(256)")]
    public int number { get; set; }
    public String role { get; set; }
    public string name { get; set; }
    public float password { get; set; }
    public int contact { get; set; }
    public string remarks { get; set; }
    public int QQ { get; set; }
    public int wechat { get; set; }

}
public class Maintain
{

    public int MaintainId { get; set; }
    [Column(TypeName = "varchar(256)")]
    public int school { get; set; }
    public String price { get; set; }
    public string name { get; set; }
    public string atype { get; set; }
    public string sector { get; set; }
    public string remarks { get; set; }
    public int coding { get; set; }
    public int qqgroup { get; set; }
    public int wxgroup { get; set; }
    public int tel { get; set; }
    public string state { get; set; }

}

public class feedform
{
    public int feedformId { get; set; }
    public string factmod { get; set; }
    public string feedschname { get; set; }
    public string fproblemhttp { get; set; }
    public DateTime feedbacktime { get; set; }
    public string imgsrc { get; set; }
    public string fannex { get; set; }
    public string fopinions { get; set; }
    public string ftechnician { get; set; }
    public string state { get; set; }
    public DateTime finputtime { get; set; }
    public string fentryclerk { get; set; }
    public string frecommendations { get; set; }
}

public class SampleContext : DbContext
{
    public SampleContext(DbContextOptions options) : base(options)
    {
    }
    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<Parking>()
            .Property(b => b.Lat)
            .HasDefaultValue(0);
        modelBuilder.Entity<Parking>()
     .Property(b => b.Lng)
     .HasDefaultValue(0);
        modelBuilder.Entity<Parking>()
    .Property(b => b.Address)
    .HasDefaultValue("");
    }
    protected SampleContext()
    {
    }
    public DbSet<User> Users { get; set; }
    public DbSet<Admin> Admins { get; set; }
    public DbSet<Site> Sites { get; set; }
    public DbSet<Parking> Parkings { get; set; }


    public DbSet<Sysform> Systems { get; set; }
    public DbSet<Custform> Customers { get; set; }
    public DbSet<Roler> Rolers { get; set; }
    public DbSet<Technology> Technologys { get; set; }
    public DbSet<Maintain> Maintains { get; set; }
    public DbSet<feedform> feedforms { get; set; }

}